package com.eastfair.imaster.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.eastfair.annotation.model.EchoVO;
import com.eastfair.core.base.entity.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * 实体类
 * 电子橱窗点位表
 * </p>
 *
 * @author zjn
 * @since 2022-03-15
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("o_shop_window_point")
@ApiModel(value = "ShopWindowPoint", description = "电子橱窗点位表")
@AllArgsConstructor
public class ShopWindowPoint extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 展会id
     */
    @ApiModelProperty(value = "展会id")
    @TableField(value = "exhibition_id")
    @Excel(name = "展会id")
    private Long exhibitionId;

    /**
     * 点位序号
     */
    @ApiModelProperty(value = "点位序号")
    @TableField(value = "point_index")
    @Excel(name = "点位序号")
    private Integer pointIndex;

    /**
     * 点位x坐标
     */
    @ApiModelProperty(value = "点位x坐标")
    @NotNull(message = "请填写点位x坐标")
    @TableField(value = "cdn_x")
    @Excel(name = "点位x坐标")
    private Integer cdnX;

    /**
     * 点位y坐标
     */
    @ApiModelProperty(value = "点位y坐标")
    @NotNull(message = "请填写点位y坐标")
    @TableField(value = "cdn_y")
    @Excel(name = "点位y坐标")
    private Integer cdnY;

    /**
     * 关联产品id
     */
    @ApiModelProperty(value = "关联产品id")
    @TableField(value = "exhibitor_product_id")
    @Excel(name = "关联产品id")
    private Long exhibitorProductId;

    /**
     * 展商id
     */
    @ApiModelProperty(value = "展商id")
    @TableField(value = "exhibitor_id")
    @Excel(name = "展商id")
    private Long exhibitorId;

    /**
     * 电子橱窗id
     */
    @ApiModelProperty(value = "电子橱窗id")
    @NotNull(message = "请填写电子橱窗id")
    @TableField(value = "shop_window_id")
    @Excel(name = "电子橱窗id")
    private Long shopWindowId;

    /**
     * 是否生效(默认1：可用 0:不可用)
     */
    @ApiModelProperty(value = "是否生效(默认1：可用 0:不可用)")
    @TableField(value = "is_enabled")
    @Excel(name = "是否生效(默认1：可用 0:不可用)")
    private Integer isEnabled;

    /**
     * 是否删除(默认0：未删除 1:已删除)
     */
    @ApiModelProperty(value = "是否删除(默认0：未删除 1:已删除)")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除(默认0：未删除 1:已删除)")
    private Integer isDeleted;


    @Builder
    public ShopWindowPoint(Long id, LocalDateTime createTime, Long createdBy, LocalDateTime updateTime, Long updatedBy, 
                    Long projectId, Long exhibitionId, Integer pointIndex, Integer cdnX, Integer cdnY, 
                    Long exhibitorProductId, Long exhibitorId, Long shopWindowId, Integer isEnabled, Integer isDeleted) {
        this.id = id;
        this.createTime = createTime;
        this.createdBy = createdBy;
        this.updateTime = updateTime;
        this.updatedBy = updatedBy;
        this.projectId = projectId;
        this.exhibitionId = exhibitionId;
        this.pointIndex = pointIndex;
        this.cdnX = cdnX;
        this.cdnY = cdnY;
        this.exhibitorProductId = exhibitorProductId;
        this.exhibitorId = exhibitorId;
        this.shopWindowId = shopWindowId;
        this.isEnabled = isEnabled;
        this.isDeleted = isDeleted;
    }

}
